package day02.annotation.aop;

public class Main {
    public static void main(String[] args) {
        /*ArithmeticCalculator arithmeticCalculator = new ArithmeticCalculatorLoggingImpl();

        int result = arithmeticCalculator.add(11, 12);
        System.out.println("result:" + result);

        result = arithmeticCalculator.div(21, 3);
        System.out.println("result:" + result);*/

        ArithmeticCalculator target = new ArithmeticCalculatorImpl();
        ArithmeticCalculator proxy =new ArithmeticCalculatorLoggingProxy(target).getLoggingProxy();

        int result = proxy.add(11, 12);
        System.out.println("result:" + result);

    }
}
